package cn.koala.key.fileupload.controller;

import cn.koala.key.fileupload.service.FileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liutao
 * @date 2021/2/2
 */
@RestController
@Api(value = "FileController", tags = "文件上传下载")
@RequestMapping("/file")
public class FileController {

    @Autowired
    private FileService fileService;

    @ApiOperation("根据配置id下载导入excel模板")
    @GetMapping("/excel/download")
    public String getDownloadUrlByConfigurationId(@ApiParam("1310-首保卡批量收卡，1311-首保卡批量扣减") @RequestParam("configurationId") String configurationId){
        return fileService.getDownloadUrlByConfigurationId(configurationId);
    }
}
